/*
 * CharacterLiteralAst.cpp
 *
 *  Created on: 3 Nov 2010
 *      Author: kn308
 */

#include <MAlice/Ast/CharacterLiteralAst.h>

#include <llvm/Constants.h>

namespace MAlice
{

CharacterLiteralAst::CharacterLiteralAst(char value) :
	mValue(value)
{
}

CharacterLiteralAst::~CharacterLiteralAst()
{
}

llvm::Value* CharacterLiteralAst::generate()
{
	using namespace llvm;
	return ConstantInt::get(Type::getInt8Ty(Codegen::get()->getContext()), mValue, false);
}

}
